<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<h:html xmlns="http://www.w3.org/1999/xhtml"
		xmlns:f="http://java.sun.com/jsf/core"
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:ui="http://java.sun.com/jsf/facelets"
		xmlns:p="http://primefaces.org/ui">

<h:head>
	<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
	<link rel="stylesheet" type="text/css" href="../css/style.css" media="screen"/>
	<title>Eventos</title>
	<script type="text/javascript">
	
		PrimeFaces.locales['pt'] = {
			    closeText: 'Fechar',
			    prevText: 'Anterior',
			    nextText: 'Próximo',
			    currentText: 'Começo',
			    monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
			    monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun', 'Jul','Ago','Set','Out','Nov','Dez'],
			    dayNames: ['Domingo','Segunda','Terça','Quarta','Quinta','Sexta','Sábado'],
			    dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
			    dayNamesMin: ['D','S','T','Q','Q','S','S'],
			    weekHeader: 'Semana',
			    firstDay: 0,
			    isRTL: false,
			    showMonthAfterYear: false,
			    yearSuffix: '',
			    timeOnlyTitle: 'Só Horas',
			    timeText: 'Tempo',
			    hourText: 'Hora',
			    minuteText: 'Minuto',
			    secondText: 'Segundo',
			    ampm: false,
			    month: 'Mês',
			    week: 'Semana',
			    day: 'Dia',
			    allDayText : 'Todo o Dia'
			};
	
		function setAba(visible) {
			var abaID = document.getElementById("pagina").value;
			var aba = document.getElementById( "aba_" + abaID );
			if (aba != null) {
				if (visible) {
					aba.className = "current";
				} else {
					aba.className = "";
				}
			}
		}
		
		function handleLoginRequest(xhr, status, args) {
	
			if(!args.cadastroUsuario) {
				jQuery('#idForm:idDlgCadastro').effect("shake", { times:3 }, 100);
			} else {
				dlgCadastro.hide();
				jQuery('#idForm:idModalDialogButton').fadeOut();
			}
		}
		function handleEventoInsertRequest(xhr, status, args) {
	
			if(!args.cadastroEvento) {
				jQuery('#idForm:idPanelGridInsert').effect("shake", { times:3 }, 100);
			} else {
				varDialogInsert.hide();
			}
		}
	
		function handleEventoDeleteRequest(xhr, status, args) {
	
			if(!args.remocaoEvento) {
				jQuery('#idForm:idPanelGridDetalhe').effect("shake", { times:3 }, 100);
			} else {
				varDialogDetalhe.hide();
			}
		}
		
		
		
	</script>
</h:head>

<h:body onunload="javascript:setAba(false)">

	<div id="content">
	
		<div id="top_info">
			<f:view>
				<h:form id="idFormMasterPage">
					<h:panelGroup id="idLogInOut">
						<h:panelGroup rendered="#{usuarioMBean.autenticado}">
							<p>Bem Vindo, <h:outputLabel value="#{usuarioMBean.usuario.nome}"/>!
								<span id="loginbutton">
									<p:commandLink action="#{usuarioMBean.logout}" ajax="false" title="Log Out"/>  
								</span>
							</p>
						</h:panelGroup>
						<h:panelGroup rendered="#{!usuarioMBean.autenticado}">
							<p><b>Você não está logado!</b></p>
						</h:panelGroup>
					</h:panelGroup>
				</h:form>	
			</f:view>
		</div>
	
		<div id="logo">
			<h1>GEWE</h1>
			<p id="slogan">Gerenciador de eventos para a EACH!</p>
		</div>
				
		<ul id="tablist">
               <li>
               	<a id="aba_home"				href="home.jsf">Home</a>
               </li>
               <li>
               	<a id="aba_eventoLista"			href="eventoLista.jsf">Lista de eventos</a>
               </li>
               <li>
               	<a id="aba_eventoDetalhe"		href="eventoDetalhe.jsf">Novo evento</a>
               </li>
               <li>
               	<a id="aba_eventoCalendario"	href="eventoCalendario.jsf">Calendário</a>
               </li>
               <li>
               	<a id="aba_javadoc"				href="../javadoc/index.html">Javadoc</a>
               </li>
               <li>
               	<a id="aba_svn"					href="https://code.google.com/p/gewe2012/source/browse/#svn%2Fbranches%2F1.0">SVN</a>
               </li>
		</ul>
		
		
		<div id="topics">
			<!--  	
			<div class="thirds">
				<p><br/>GEWE </p>
			</div>
			<div class="thirds">
				<ul>
					
					<br/>
					<li>Gerenciamneto de Eventos</li>
				</ul>
			</div>
			<div class="thirds">
				<ul>
					<li>Google</li>
					<li>Jetty</li>
					<li>BigTable</li>
				</ul>
			</div>
			-->	
		</div>
		
		<div id="search">
		</div>
							
		<div id="left">
			<div class="subheader">
				<p><h2>
					<ui:insert name="titulo" ></ui:insert >
				</h2></p>
			</div>
			<div class="left_articles" align="center">
				
				<ui:insert name="centro" >
					
					<!-- Pagina fica aqui -->
					
				</ui:insert >
				
				<f:view>
					<p:ajaxStatus style="width:64px;height:64px;position:fixed;right:5px;bottom:5px">
					    <f:facet name="start">
					        <p:graphicImage value="../images/ajax-loader.gif" />
					    </f:facet>
					
					    <f:facet name="complete">
					        <h:outputText value="" />
					    </f:facet>
					</p:ajaxStatus>
				</f:view>			
				
			</div>
			<!-- 
			<div class="left_box">
				<p align="center">Escola de Artes, Ciências e Humanidades (USP Leste)</p>
				<p align="center">Rua Arlindo Béttio, 1000 - Ermelino Matarazzo - CEP: 03828-000</p>
			</div>
			 -->
			
		</div>	
		
		<div id="right">
			
		</div>
		
		<div id="footer">
			<p class="right">&copy; 2012 EACH<a href="#" ></a></p>
			<p><a href="#">RSS Feed</a> &middot; <a href="#">Contato</a> &middot; <a href="#">Acessibilidade</a></p>
			
		</div>
	</div>

</h:body>

<script type="text/javascript">
	setAba(true);
</script>

</h:html>